package com.itheima.springboot_condition.config;


import com.alibaba.fastjson.JSON;
import com.itheima.springboot_condition.condition.ConditionOnClass;
import com.itheima.springboot_condition.domain.User;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UserConfig {

    @Bean
//    @Conditional(ClassCondition.class)
    @ConditionOnClass("com.alibaba.fastjson.JSON")
    public User user(){

        return new User();
    }
}
